package com.mef.smsplat.eterm.bean;

import java.util.ArrayList;
import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
@XmlRootElement
public class RtResult implements Cloneable {

	private boolean isGroup;
	private String groupName;
	private int passengerNumber;
	private String groupNumber;
	private String pnrCode;
	private String officeCode;
	
	private List<String> phoneList;
	private List<PNRSeg> segsList;

	private List<PNRPasseenger> passeengerList;

	private List<PNRTicket> ticketList;
	
	private String agentName;
	
	
	
	public void setSegsList(List<PNRSeg> segsList) {
		this.segsList = segsList;
	}
	public void setTicketList(List<PNRTicket> ticketList) {
		this.ticketList = ticketList;
	}
	@Override
	public Object clone() throws CloneNotSupportedException {
		return super.clone();
	}
	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this,
				ToStringStyle.MULTI_LINE_STYLE);
	}
	@XmlElementWrapper(name="tickets")
	@XmlElement(name="ticket")
	public List<PNRTicket> getTicketList() {
		if(this.ticketList == null)
			ticketList = new ArrayList<PNRTicket>();
		return ticketList;
	}

	public boolean isGroup() {
		return isGroup;
	}

	public String getGroupName() {
		return groupName;
	}

	public int getPassengerNumber() {
		return passengerNumber;
	}

	public String getGroupNumber() {
		return groupNumber;
	}

	public String getPnrCode() {
		return pnrCode;
	}
	@XmlElementWrapper(name="segs")
	@XmlElement(name="seg")
	public List<PNRSeg> getSegsList() {
		if(segsList==null)
			this.segsList = new ArrayList<PNRSeg>();
		return segsList;
	}
	@XmlElementWrapper(name="passengers")
	@XmlElement(name="passenger")
	public List<PNRPasseenger> getPasseengerList() {
		if(this.passeengerList ==null)
			this.passeengerList = new ArrayList<PNRPasseenger>();
		return passeengerList;
	}

	public void setGroup(boolean isGroup) {
		this.isGroup = isGroup;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

	public void setPassengerNumber(int passengerNumber) {
		this.passengerNumber = passengerNumber;
	}

	public void setGroupNumber(String groupNumber) {
		this.groupNumber = groupNumber;
	}

	public void setPnrCode(String pnrCode) {
		this.pnrCode = pnrCode;
	}

	public void setOfficeCode(String officeCode) {
		this.officeCode = officeCode;
	}
	@XmlElement(name="officeCode")
	public String getOfficeCode() {
		return officeCode;
	}

	@XmlElementWrapper(name="phones")
	@XmlElement(name="phone")
	public List<String> getPhoneList() {
		if(this.phoneList==null)
			this.phoneList = new ArrayList<String>(5);
		return phoneList;
	}
	public void setAgentName(String agentName) {
		this.agentName = agentName;
	}
	public String getAgentName() {
		return agentName;
	}
	
	


}
